# -*- coding: utf-8 -*-
# @Time    : 2022/4/18 14:01
# @File : web_option.py
# @Author  : Yang

from time import sleep

from selenium import webdriver


class ChromeOptions:
    def options(self):
        # chrome浏览器的配置项，可以通过修改默认参数，改变默认启动的浏览器的形态
        options = webdriver.ChromeOptions()
        # 将浏览器默认设置为最大窗体
        options.add_argument('start-maximized')
        options.add_experimental_option('excludeSwitches', ['enable-automation', 'enable-logging'])
        prefs = dict()
        prefs["credentials_enable_service"] = False
        prefs['profile.password_manager_enable'] = False
        options.add_experimental_option("prefs", prefs)
        return options
